package Q479

class Main {

}

/**
 * 最简单的就是打表算法
 */
class Solution {
    fun largestPalindrome(n: Int): Int {
        var arr = intArrayOf(9,987,123,597,677,1218,877,475);
        return arr[n - 1];
    }
}

fun main(){
    println(Solution().largestPalindrome(2))
}